<?php
/* @var $this yii\web\View */
use yii\helpers\ArrayHelper;
use yii\widgets\Breadcrumbs;

//var_dump(\yii\helpers\ArrayHelper::map($list, 'id', 'order_id'));
?>
<h1>order/order-item/index</h1>

<?= \yii\helpers\Html::DropDownList('list', null, ArrayHelper::map($list, 'id', 'order_id')); ?><br>
<?= \yii\helpers\Html::activeDropDownList($model, 'increment_id', ArrayHelper::map($list, 'id', 'increment_id')); ?>

<?php
$form = \yii\widgets\ActiveForm::begin();
// 文本框
echo $form->field($model, 'id')->textInput(['maxlength' => 20]);
// 单选框
echo $form->field($model, 'order_id')->radioList(['1'=>'man', '2'=>'men']);
// 下拉框
echo $form->field($model, 'increment_id')->dropDownList(['1'=>'unversity', '2'=>'middle', '3'=>'cz'], ['prompt'=>'请选择','style'=>'width:120px']);
\yii\widgets\ActiveForm::end();

// 返回首页
echo $relativeHomeUrl = \yii\helpers\Url::home();
///site/index
echo \yii\helpers\Url::to('site/index');

echo \yii\helpers\Url::to('@webroot');

$this->params['breadcrumbs'][] = ['label' => '文章管理', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
//摘自layout文件的代码
echo Breadcrumbs::widget([
    'tag'=>'ol',
    'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]);
?>
